const {
    override,
    addWebpackAlias,
    fixBabelImports,
    addLessLoader,
  } = require("customize-cra");
  const path = require('path');
  const resolve = path.join(__dirname, './src');
  module.exports = override(
    fixBabelImports("import", {
      libraryName: "antd-mobile", libraryDirectory: "es", style: true // change importing css to less
    }),
    addLessLoader ({ 
      lessOptions:{ 
        javascriptEnabled:true ,
        ModifyVars:{  '@ primary-color':'＃1DA57A'  } ,
      } ,
    }),
    addWebpackAlias({
      '@': resolve
    }),
  )